//
//  ViewController.m
//  luahelloworld
//
//  Created by liwei on 13-10-2.
//  Copyright (c) 2013年 liwei. All rights reserved.
//

#import "ViewController.h"

extern "C"
{
#include <lua.h>
#include <lauxlib.h>
}

//#include <iostream>
#include <luabind/luabind.hpp>
#include <luabind/lua_include.hpp>
#include "luaengine.h"
//void greet()
//{
//    std::cout << "hello world!/n";
//}

//extern "C" int luaopen_luabind_test(lua_State* L)
//{
//    using namespace luabind;
//    
//    open(L);
//    
//    module(L)
//    [
//     def("greet", &greet)
//     ];
//    return 0;
//}


@interface ViewController ()
- (void)runLua;
@end

@implementation ViewController

- (void)runLua
{
    
    LuaEngine::GetInstance()->Init();
    LuaEngine::GetInstance()->Start();
    LuaEngine::GetInstance()->Stop();
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    [self runLua];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
